/*
 * @Author: your name
 * @Date: 2020-09-18 09:31:02
 * @LastEditTime: 2021-01-13 16:42:58
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \supplyweb\src\router\index.js
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import children from './UserchildrenRoutes.js'

Vue.use(VueRouter)
// 孔祥欢线上路由  请把 requireAuth 改为true
/**
 * @title   备注路由信息
 * @requireAuth   是否需要登录访问   默认false  不需要登录访问，   true,需要登录访问
 * @footer    是否显示公告底部   默认true显示, false 不显示 
 * @header  是否显示公共头部   默认true显示, false 不显示 
 */
const routes = [
  {
    path: '/',
    name: 'Home',
    redirect: '/home',
    meta: {
      title: '首页'
    }
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    meta: {
      title: '首页',

    }
  },
  {
    path: '/ProductProvide',
    name: 'ProductProvide',
    component: () => import('../views/index/ProductProvide/index.vue'),
    meta: {
      title: '产品供应',
    }
  },
  {
    path: '/ProductContent',
    name: 'ProductContent',
    component: () => import('../views/index/ProductProvide/ProductContents/ProductContent.vue'),
    meta: {
      title: '产品供应详情',
      guidePath: true,
      jumpPath: '/ProductProvide'
    }
  },
  {
    path: '/MaterialDemand',
    name: 'MaterialDemand',
    component: () => import('../views/index/MaterialDemand/index.vue'),
    meta: {
      title: '产品需求'
    }
  },
  {
    path: '/MaterialDetails',
    name: 'MaterialDetails',
    component: () => import('../views/index/MaterialDemand/comments/MaterialDetails.vue'),
    meta: {
      title: '需求详情',
      guidePath: true,
      jumpPath: '/MaterialDemand'
    }
  },
  {
    path: '/programmelist',
    name: 'ProgrammeList',
    component: () => import('../views/index/programme/programmelist.vue'),
    meta: {
      title: '解决方案'
    }
  }, {
    path: '/ProgrammeContent',
    name: 'ProgrammeContent',
    component: () => import('../views/index/programme/ProgrammeContent.vue'),
    meta: {
      title: '解决方案详情',
      guidePath: true,
      jumpPath: '/programmelist'
    }
  }, {
    path: '/feedback',
    name: 'feedback',
    component: () => import('../views/index/feedback/index.vue'),
    meta: {
      title: '问题反馈'
    }
  },
  {
    path: '/entIndex',
    name: 'entIndex',
    component: () => import('../views/index/Enterprise/index.vue'),
    meta: {
      title: '企业名片列表'
    }
  },
  {
    path: '/entdetails',
    name: 'entDetails',
    component: () => import('../views/index/Enterprise/entDetails.vue'),
    meta: {
      title: '企业名片详情',
      guidePath: true,
      jumpPath: '/entIndex'
    }
  },
  {
    path: '/AttractInvestment',
    name: 'AttractInvestment',
    component: () => import('../views/index/AttractInvestment/index.vue'),
    meta: {
      title: '金融服务'
    }
  },
  {
    path: '/AttractInvestmentDetails',
    name: '/AttractInvestmentDetails',
    component: () => import('../views/index/AttractInvestment/AttractInvestmentDetails.vue'),
    meta: {
      title: '金融服务详情',
      guidePath: true,
      jumpPath: '/AttractInvestment'
    }
  },
  {
    path: '/creApply',
    name: '/creApply',
    component: () => import('../views/index/AttractInvestment/apply.vue'),
    meta: {
      title: '金融服务申请',
      guidePath: true,
      jumpPath: '/AttractInvestment'
    }
  },
  {
    path: '/InviteBidding',
    name: 'InviteBidding',
    component: () => import('../views/index/InviteBidding/index.vue'),
    meta: {
      title: '招标公告'
    }
  },
  {
    path: '/InviteBiddingDetails',
    name: '/InviteBiddingDetails',
    component: () => import('../views/index/InviteBidding/InviteBiddingDetails.vue'),
    meta: {
      title: '招标公告详情',
      guidePath: true,
      jumpPath: '/InviteBidding'
    }
  },
  {
    path: '/zfInviteBiddingDetails',
    name: '/zfInviteBiddingDetails',
    component: () => import('../views/index/InviteBidding/zfInviteBiddingDetails.vue'),
    meta: {
      title: '招标公告详情',
      guidePath: true,
      jumpPath: '/InviteBidding'
    }
  },
  {
    path: '/Policy',
    name: 'Policy',
    component: () => import('../views/index/Policy/index.vue'),
    meta: {
      title: '政策规范'
    }
  },
  {
    path: '/PolicyDetails',
    name: 'PolicyDetails',
    component: () => import('../views/index/Policy/PolicyDetails.vue'),
    meta: {
      title: '政策规范详情',
      guidePath: true,
      jumpPath: '/Policy'
    }
  },
  {
    path: '/Notice',
    name: 'Notice',
    component: () => import('../views/index/Notice/index.vue'),
    meta: {
      title: '通知公告'
    }
  },
  {
    path: '/NoticeDetails',
    name: 'NoticeDetails',
    component: () => import('../views/index/Notice/NoticeDetails.vue'),
    meta: {
      title: '通知通告详情',
      guidePath: true,
      jumpPath: '/Notice'
    }
  },
  // 用户中心主页
  {
    path: '/usercenter',
    name: 'usercenter',

    component: () => import('../views/usercenter/index.vue'),
    meta: {
      title: '用户中心主页',
      header: false,
      footer: false,
      requireAuth: true
    },
    children
  },
  {
    path: "/login",
    name: "login",
    component: () => import('../views/login/Login.vue'),
    meta: {
      title: '登录',
      header: false,
      requireAuth: false,
      footer: false,
    }
  },
  {
    path: "/register",
    name: "register",
    component: () => import('../views/login/Register.vue'),
    meta: {
      title: '注册',
      header: false,
      requireAuth: false,
      footer: false,
    }
  },

]

const router = new VueRouter({
  mode: 'history',
  // base: process.env.BASE_URL,
  base: '/aupply-chains-14-16203/',
  routes
})

export default router
